package com.dhl.visitor;

import com.dhl.visitor.evaluating.Man;
import com.dhl.visitor.evaluating.Woman;
import com.dhl.visitor.result.Fail;
import com.dhl.visitor.result.Success;
import com.dhl.visitor.result.Wait;

/**
 * @title: Client
 * @Author danghailiang
 * @Date: 2022/8/20 13:01
 * @Version 1.0
 */
public class Client {
    public static void main(String[] args) {
        // 保存对象结果
        ObjectStructure objectStructure = new ObjectStructure();
        // 评测的所有结果
        Action success = new Success();
        Action fail = new Fail();
        Action wait = new Wait();
        // 参与评测的人
        Man man = new Man();
        Woman woman = new Woman();
        // 添加参与评测的人
        objectStructure.attach(man);
        objectStructure.attach(woman);
        // 男人进行成功评测
        success.getManResult(man);
        // 女人进行成功评测
        success.getWomanResult(woman);
        // 男人进行待定评测
        wait.getManResult(man);
        // 女人进行失败评测
        fail.getWomanResult(woman);
        // 查看成功有多少数据
        objectStructure.dispany(success);
    }
}
